package com.ruoyi.business.workshop.domain;

import java.io.Serializable;
import java.util.List;  
import java.util.ArrayList;

/**
 * 工段
 */
public class WorkshopSection implements Serializable {

    private static final long serialVersionUID = 1L;

    private String sectionName;   // 如11段、12段、21段...
    private int startSlotNo;      // 起始槽号（如1001）
    private int endSlotNo;        // 结束槽号（如1075）
    private int slotCount;        // 槽数（如75/76/77）
    private int pointsPerSlot;    // 每槽点位数（4或6）
    private List<WorkshopSlotInfo> slotInfos; // 槽位信息列表

    public WorkshopSection() {}

    public WorkshopSection(String sectionName, int startSlotNo, int endSlotNo, int slotCount, int pointsPerSlot) {
        this.sectionName = sectionName;
        this.startSlotNo = startSlotNo;
        this.endSlotNo = endSlotNo;
        this.slotCount = slotCount;
        this.pointsPerSlot = pointsPerSlot;
        this.slotInfos = new ArrayList<>();
        for (int i = startSlotNo; i <= endSlotNo; i++) {
            this.slotInfos.add(new WorkshopSlotInfo(i, pointsPerSlot, false, false));
        }
    }

    public String getSectionName() { return sectionName; }
    public void setSectionName(String sectionName) { this.sectionName = sectionName; }

    public int getStartSlotNo() { return startSlotNo; }
    public void setStartSlotNo(int startSlotNo) { this.startSlotNo = startSlotNo; }

    public int getEndSlotNo() { return endSlotNo; }
    public void setEndSlotNo(int endSlotNo) { this.endSlotNo = endSlotNo; }

    public int getSlotCount() { return slotCount; }
    public void setSlotCount(int slotCount) { this.slotCount = slotCount; }

    public int getPointsPerSlot() { return pointsPerSlot; }
    public void setPointsPerSlot(int pointsPerSlot) { this.pointsPerSlot = pointsPerSlot; }

    public List<WorkshopSlotInfo> getSlotInfos() { return slotInfos; }
    public void setSlotInfos(List<WorkshopSlotInfo> slotInfos) { this.slotInfos = slotInfos; }
}


